﻿using System.Collections.Generic;

namespace com.binance.client.model.enums
{
	 

	/// <summary>
	/// working, lock.
	/// </summary>
	public sealed class AccountState
	{
	  public static readonly AccountState WORKING = new AccountState("WORKING", InnerEnum.WORKING, "working");
	  public static readonly AccountState LOCK = new AccountState("LOCK", InnerEnum.LOCK, "lock");

	  private static readonly IList<AccountState> valueList = new List<AccountState>();

	  static AccountState()
	  {
		  valueList.Add(WORKING);
		  valueList.Add(LOCK);
	  }

	  public enum InnerEnum
	  {
		  WORKING,
		  LOCK
	  }

	  public readonly InnerEnum innerEnumValue;
	  private readonly string nameValue;
	  private readonly int ordinalValue;
	  private static int nextOrdinal = 0;

	  private readonly string code;

	  internal AccountState(string name, InnerEnum innerEnum, string code)
	  {
		this.code = code;

		  nameValue = name;
		  ordinalValue = nextOrdinal++;
		  innerEnumValue = innerEnum;
	  }

	  public override string ToString()
	  {
		return code;
	  }

//JAVA TO C# CONVERTER NOTE: Fields cannot have the same name as methods:EnumLookup

		public static IList<AccountState> values()
		{
			return valueList;
		}

		public int ordinal()
		{
			return ordinalValue;
		}

		public static AccountState valueOf(string name)
		{
			foreach (AccountState enumInstance in AccountState.valueList)
			{
				if (enumInstance.nameValue == name)
				{
					return enumInstance;
				}
			}
			throw new System.ArgumentException(name);
		}
	}

}